<template>
  <div class="staff">
    <Tabs :text="text">
      <Search @data="upState" />
    </Tabs>
    <StaffSearchItem v-if="state" />
    <router-view></router-view>
    <!-- <Paging /> -->
  </div>
</template>

<script>
import Tabs from "../components/Tabs.vue";
// import Paging from "../components/Paging.vue";
import Search from "../components/Search.vue";
import StaffSearchItem from "../components/StaffSearchItem.vue";

export default {
  name: "Staff",
  components: {
    Tabs,
    // Paging,
    Search,
    StaffSearchItem,
  },
  data() {
    return {
      text: [
        {
          id: "0",
          textName: "部门设置",
          url: "/staff/department-set",
        },
        {
          id: "1",
          textName: "角色权限",
          url: "/staff/role-based",
        },
        {
          id: "2",
          textName: "员工列表",
          url: "/staff/staff-list",
        },
        {
          id: "3",
          textName: "新增员工",
          url: "/staff/add-staff",
        },
      ],
      state: false,
    };
  },
  methods: {
    upState(data) {
      this.state = !data; //状态处理
    },
  },
};
</script>

<style>
</style>